//
// Created by bjliuyong on 2021/6/10.
//

#ifndef GC_GC_FACTORY_H
#define GC_GC_FACTORY_H

#include "../memory_chunk.h"

typedef enum {
    MARK_CLEAN,
    MARK_COMPACT,
    MARK_COPY,
    G1,
} GC_Type;

typedef enum {
    CLOSE,
    WORKING,
} GC_Status;

#define DEFAULT_GC_TYPE MARK_CLEAN

class GCFactory {
private:
    GC_Status m_status;
public:
    static GCFactory *getInstance() {
        static GCFactory factory;
        return &factory;
    }

public:
    void minor_run(GC_Type gcType, MemoryChunk *memoryChunk);
};

#endif //GC_GC_FACTORY_H
